A=[3 -5 0; -2 6 4; 1 1 4];
A(2,:)=A(2,:)+2/3*A(1,:);
A(3,:)=A(3,:)-1/3*A(1,:);
A(3,:)=A(3,:)-A(2,:);
A